package com.erdos.cas.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

import com.erdos.common.entity.AbstractEntity;
import com.erdos.upc.entity.User;

public class AppList extends AbstractEntity implements Serializable {
	
	/**默认序列ID*/
	private static final long serialVersionUID = 1L;

	/**应用名*/
	private String appName;
	
	/**链接URL*/
	private String appUrl;
	
	/**应用类型*/
	private String type;
	
	/**用户密码加密类型*/
	private String passwordType;
	
	/*
	 * 用户列表
	 */
	@SuppressWarnings("unchecked")
	private List<User> userList = new ArrayList();
	
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getAppUrl() {
		return appUrl;
	}

	public void setAppUrl(String appUrl) {
		this.appUrl = appUrl;
	}

	public String getPasswordType() {
		return passwordType;
	} 

	public void setPasswordType(String passwordType) {
		this.passwordType = passwordType;
	}

	public List<User> getUserList() {
		return userList;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public boolean equals(Object o) {
		if (!(o instanceof AppList)) {
			return false;
		}
		AppList appList = (AppList) o;
		return new EqualsBuilder().append(this.getAppName(), appList.getAppName()).isEquals();
	}

	/**
	 * hashCode方法复写
	 */
	public int hashCode() {
		return new HashCodeBuilder(61, 15).append(this.getAppName()).toHashCode();
	}
	
}
